<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 
/**
 * Notifier
 *
 * @author Gerard Paul V. Balila
 *
 * Builds $system_message for notifying users if a function has failed, succeded, or just informs the user
 * 
 * @access public
 * @params string, string ($type can only be 'error', 'success', and 'notice')
 * @return string
*/
class Notifier {

    public function build_system_message($message_type, $message)
    {
		$class = "alert-box";
		switch($message_type)
		{
			case 'error':
				$class .= " alert";
				break;
			case 'success':
				$class .= " success";
				break;
			case 'notice':
				$class .= " secondary";
				break;
			default:
				break;
				
		}
		$sys_message = "<div data-alert class='$class'>"; // open <div> tag
		$sys_message .= $message;
		$sys_message .= "</div>"; // close final <div> tag
		return $sys_message;
    }
}

/* End of file Notifier.php */